package com.ddh.ddhsanguogame.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; // 引入 ApiModelProperty 注解
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 消息实体类
 * </p>
 *
 * @author
 * @since 2025-06-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("card_message")
@ApiModel(value = "CardMessage对象", description = "消息实体类")
public class CardMessage implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "消息ID", example = "1")
    private Long id;

    @ApiModelProperty(value = "消息内容", example = "Hello, world!")
    private String content;

    @ApiModelProperty(value = "发送者ID", example = "1")
    private Long senderId;

    @ApiModelProperty(value = "接收者ID（私聊消息）", example = "2")
    private Long receiverId;

    @ApiModelProperty(value = "发送时间", example = "2023-10-01T12:00:00")
    private Date sendTime;

    @ApiModelProperty(value = "消息类型（GROUP, PRIVATE）", example = "PRIVATE")
    private String messageType;
}
